include ../makefile_public
include ./makefile_public

LDFLAGS += -lchenlib -lncurses -ltinyxml -lloki -pthread
GUI	= ncurses

TARGET = psdemo

CPPOBJS = $(wildcard $(OBJS_DIR)/*.o)

.PHONY:
all: MAKE_LIB MAKE_SRC MAKE_GUI $(TARGET)

$(TARGET): $(CPPOBJS)
	$(CXX)  $(OBJS_DIR)/*.o -o $(BIN_DIR)/$@ $(LDFLAGS)

MAKE_LIB:
	cd $(CHENLIB_DIR); make
	
MAKE_SRC:
	cd $(SRC_DIR); make
	
MAKE_GUI:
	cd $(GUI_DIR); make
	
clean:
	cd $(CHENLIB_DIR); make clean 
	-rm -f $(CPPOBJS)
	-rm -f $(BIN_DIR)/$(TARGET)
